package com.situ.water_system.service.impl;

import com.situ.water_system.mapper.SyEmpMapper;
import com.situ.water_system.pojo.SyEmp;
import com.situ.water_system.pojo.SyMenu;
import com.situ.water_system.mapper.SyMenuMapper;
import com.situ.water_system.service.SyMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Angel
 * @since 2020-12-01
 */
@Service
public class SyMenuServiceImpl extends ServiceImpl<SyMenuMapper, SyMenu> implements SyMenuService {
    @Autowired
    private SyMenuMapper dao;
    public List<SyMenu> selectList(){
        return  dao.selectList(null);
    }
    @Transactional
    public int del(Serializable id){
        return dao.deleteById(id);
    }
    @Transactional
    public int add(SyMenu syArea){
        return dao.insert(syArea);
    }
    @Transactional
    public int update(SyMenu syArea){
        return dao.updateById(syArea);
    }
    public SyMenu selectByid(Serializable id){
        return  dao.selectById(id);
    }
}
